#ifndef VIEW_H
#define VIEW_H

#include <QGraphicsView>

class MainWindow;

class View : public QGraphicsView
{
    Q_OBJECT

public:
    View(MainWindow* mainWindow);

public slots:
    void redrawBackground();

protected:
    void mouseMoveEvent(QMouseEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void contextMenuEvent(QContextMenuEvent *e);
    void drawBackground(QPainter *painter, const QRectF &rect);

private:
    MainWindow* m_mainWindow;
    bool m_hold;
    bool m_grid;

};

#endif // VIEW_H
